package xyz.zhouzhaodong.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import xyz.zhouzhaodong.crm.dto.CustomerDto;
import xyz.zhouzhaodong.crm.dto.FormDto;
import xyz.zhouzhaodong.crm.dto.NotificationDto;
import xyz.zhouzhaodong.crm.entity.Customer;

import java.util.List;

/**
 * <p>
 * 客户表 Mapper 接口
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-17
 */
public interface CustomerMapper extends BaseMapper<Customer> {

    /**
     * 查询数量
     * @param staffId
     * @param flag
     * @param connectType
     * @return
     */
    Integer selectNum(@Param("staffId") String staffId, @Param("flag") Integer flag, @Param("connectType") String connectType);

    /**
     * 查询数量
     * @param staffId
     * @param flag
     * @param connectType
     * @return
     */
    Integer selectCloseNum(@Param("staffId") String staffId, @Param("flag") Integer flag, @Param("connectType") String connectType);

    /**
     * 分页查询
     * @param page
     * @param customerDto
     * @return
     */
    IPage<CustomerDto> selectListPage(Page<CustomerDto> page,
                                      @Param("customerDto") CustomerDto customerDto);

    /**
     * 成交列表显示
     * @param page
     * @param customerDto
     * @return
     */
    IPage<CustomerDto> selectCustomerDeal(Page<CustomerDto> page,
                                          @Param("customerDto") CustomerDto customerDto);

    /**
     * 待报到列表显示
     * @param page
     * @param customerDto
     * @return
     */
    IPage<CustomerDto> selectCustomerReport(Page<CustomerDto> page,
                                          @Param("customerDto") CustomerDto customerDto);

    /**
     * 完成录取列表显示
     * @param page
     * @param customerDto
     * @return
     */
    IPage<CustomerDto> selectCustomerComplete(Page<CustomerDto> page,
                                            @Param("customerDto") CustomerDto customerDto);

    /**
     * 到校列表显示
     * @param page
     * @param customerDto
     * @return
     */
    IPage<CustomerDto> selectCustomerToSchool(Page<CustomerDto> page,
                                              @Param("customerDto") CustomerDto customerDto);

    /**
     * 汇总显示
     * @param formDto
     * @return
     */
    List<FormDto> selectCustomerForm(@Param("formDto") FormDto formDto);

    /**
     * 高校汇总显示
     * @param formDto
     * @return
     */
    List<FormDto> selectCustomerColleges(@Param("formDto") FormDto formDto);
}
